package com.atguigu.service.impl;

import com.atguigu.mapper.FruitMapper;
import com.atguigu.pojo.Fruit;
import com.atguigu.service.FruitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class FruitServiceImpl implements FruitService {
    @Autowired
    private FruitMapper fruitMapper;

    @Override
    public List<Fruit> getFruits() {
        return fruitMapper.getFruits();
    }

    @Override
    public Fruit getFruit(int id) {
        return fruitMapper.getFruitById(id);
    }
}
